package org.raymond.iworks.study.basic.designpattern.state.money;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class Client {
    public static void main(String[] args) {
        Context context = new Context();
        context.setState(new PublishState());
        System.out.println("current:"+context.getCurrentState());


        context.acceptOrderEvent(context);
        context.payOrderEvent(context);
        try {
            context.checkFailEvent(context);
        }catch(Exception e){
            System.err.println(e.getMessage());
        }
    }
}
